Skip to content

Add subworkflow for gridss somatic structural variant calling - #12574

Open
imsarath wants to merge 8 commits into
nf-core:masterfrom
imsarath:subworkflow_gridss_somatic_svs_calling
Open

Add subworkflow for gridss somatic structural variant calling#12574
imsarath wants to merge 8 commits into
nf-core:masterfrom
imsarath:subworkflow_gridss_somatic_svs_calling

Conversation

@imsarath

@imsarath imsarath commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

This PR adds bam_tumor_normal_somatic_structural_variant_calling_gridss, a subworkflow that calls somatic structural variants from a tumor/normal BAM pair. It chains the full GRIDSS workflow - optional targeted fragment extraction, per-sample preprocess, joint assembly and call, then gridss_somatic_filter. It emits the unfiltered joint VCF plus the all-somatic and high-confidence somatic call sets.

PR checklist

Closes #4498

  • This comment contains a description of changes (with reason).
  • If you've fixed a bug or added code that should be tested, add tests!
  • If you've added a new tool - have you followed the module conventions in the contribution docs
  • If necessary, include test data in your PR.
  • Remove all TODO statements.
  • Broadcast software version numbers to topic: versions - See version_topics
  • Follow the naming conventions.
  • Follow the parameters requirements.
  • Follow the input/output options guidelines.
  • Add a resource label
  • Use BioConda and BioContainers if possible to fulfil software requirements.
  • Ensure that the test works with either Docker / Singularity. Conda CI tests can be quite flaky:
    • For modules:
      • nf-core modules test <MODULE> --profile docker
      • nf-core modules test <MODULE> --profile singularity
      • nf-core modules test <MODULE> --profile conda
    • For subworkflows:
      • nf-core subworkflows test <SUBWORKFLOW> --profile docker
      • nf-core subworkflows test <SUBWORKFLOW> --profile singularity
      • nf-core subworkflows test <SUBWORKFLOW> --profile conda

@imsarath imsarath self-assigned this Aug 4, 2026
Comment thread subworkflows/nf-core/bam_somatic_sv_calling_gridss/tests/main.nf.test Outdated
Comment thread subworkflows/nf-core/bam_somatic_sv_calling_gridss/main.nf Outdated

@SPPearce SPPearce left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you format the main.nf with each module argument on its own line too please

Comment on lines +70 to +74
{ assert snapshot(
path(workflow.out.gridss_vcf[0][1]).vcf.summary,
workflow.out.all_somatic_vcf.collect { meta, vcf -> [ meta, file(vcf).name ] },
workflow.out.high_confidence_somatic_vcf.collect { meta, vcf -> [ meta, file(vcf).name ] }
).match() }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try this (untested):

Suggested change
{ assert snapshot(
path(workflow.out.gridss_vcf[0][1]).vcf.summary,
workflow.out.all_somatic_vcf.collect { meta, vcf -> [ meta, file(vcf).name ] },
workflow.out.high_confidence_somatic_vcf.collect { meta, vcf -> [ meta, file(vcf).name ] }
).match() }
{ assert snapshot(sanitizeOutput(workflow.out, variantsMD5Keys: ["gridss_vcf", "all_somatic_vcf", "high_confidence_somatic_vcf"]).match() }

@SPPearce SPPearce left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of comments.
You should be able to calculate is_targeted based on whether ch_target_bed exists?
Should the input tuple be flatter, rather than [tumour_bam, normal_bam] as a nested tuple.
Should the target bed be part of the input tuple? I could see scenarios where you are only interested in certain variants per sample.
What happens if you have more than one tumour sample per normal sample, can the subworkflow deal with that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

new subworkflow: distributed computing GRIDSS subworkflow

2 participants